package cn.edu.scau.cmi.liangzaoqing.client;

import org.hibernate.SessionFactory;

import cn.edu.scau.cmi.liangzaoqing.util.HibernateSessionFactoryUtil;

/*用于测试HibernateSessionFactoryUtil是否真正得到单例*/
public class HibernateSessionFactoryClient {

	public static void main(String[] args) {
		HibernateSessionFactoryUtil hibernateSessionFactoryUtil1 = new HibernateSessionFactoryUtil();
		SessionFactory sf1 = hibernateSessionFactoryUtil1.getSessionFactory();
		SessionFactory sf2 = hibernateSessionFactoryUtil1.getSessionFactory();
		
		HibernateSessionFactoryUtil hibernateSessionFactoryUtil2 = new HibernateSessionFactoryUtil();
		SessionFactory sf3 = hibernateSessionFactoryUtil2.getSessionFactory();
		SessionFactory sf4 = hibernateSessionFactoryUtil2.getSessionFactory();
		
		System.out.println(sf1);
		System.out.println(sf2);
		System.out.println(sf3);
		System.out.println(sf4);
	}
}